//package com.zmn.plat.admin.api.master;
//
//import com.alibaba.dubbo.config.annotation.Reference;
//import com.zmn.common.dto2.ResponseDTO;
//import com.zmn.common.utils.number.NumberUtil;
//import com.zmn.common.utils.string.StringUtil;
//import com.zmn.plat.admin.controller.PlatBaseController;
//import com.zmn.plat.dubbo.interfaces.mast.master.MasterRemoteService;
//import com.zmn.plat.dubbo.utils.DubboConsts;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.util.List;
//
///**
// * 工程师查询API
// *
// * @uthor heguanghua
// * @since 2019/10/16 16:35
// */
//@Controller
//@RequestMapping("/api/master/")
//@Deprecated
//public class ApiMasterListController extends PlatBaseController {
//
//    @Reference(version = DubboConsts.INTERFACE_VERSION, check = false)
//    private MasterRemoteService masterRemoteService;
//
//
//    /**
//     * 搜索工程师
//     */
//    @RequestMapping(value = "search")
//    @ResponseBody
//    @Deprecated
//    public ResponseDTO search(HttpServletRequest request, HttpServletResponse response,
//                              @RequestParam(value = "plat", required = false) Integer plat,
//                              @RequestParam(value = "companyId", required = false) Integer companyId,
//                              @RequestParam(value = "spCompanyId", required = false) Integer spCompanyId,
//                              @RequestParam(value = "type", required = false) Integer type,
//                              @RequestParam(value = "status", required = false) Integer status,
//                              @RequestParam(value = "keyword", defaultValue = "") String keyword,
//                              @RequestParam(value = "staffId", defaultValue = "0") Integer staffId) {
//
//        if (StringUtil.isBlank(keyword)) {
//            return ResponseDTO.fail("请输入查询关键词");
//        }
//
//        return this.listMasterVtByQuery(plat, companyId, spCompanyId, type, status, keyword);
//    }
//
//    // region 搜索工程师
//
//    /**
//     * 搜索工程师
//     *
//     * @param plat        所属平台，Null不限
//     * @param companyId   子公司Id，Null不限
//     * @param spCompanyId 服务商公司Id，Null不限
//     * @param type        工程师类型，1自有，2第三方，Null不限
//     * @param status      状态，1禁用，2启用，Null不限
//     * @param keyword     搜索关键词，支持姓名及拼音、手机号码模糊搜索，Null不限
//     * @return 工程师Id，姓名<手机号>和状态字段列表
//     */
//    private ResponseDTO<List> listMasterVtByQuery(Integer plat, Integer companyId, Integer spCompanyId, Integer type, Integer status, String keyword) {
//
//        plat = NumberUtil.isNullOrZero(plat) ? null : plat;
//        companyId = NumberUtil.isNullOrZero(companyId) ? null : companyId;
//        spCompanyId = NumberUtil.isNullOrZero(spCompanyId) ? null : spCompanyId;
//        type = NumberUtil.isNullOrZero(type) ? null : type;
//        status = NumberUtil.isNullOrZero(status) ? null : status;
//        keyword = StringUtil.isBlank(keyword) ? null : keyword;
//
//        return masterRemoteService.listMasterVtByQuery(plat, companyId, spCompanyId, type, status, keyword);
////        if (response.getStatusBool() == null || !response.getStatusBool() || response.getItems() == null) {
////            return new ResponseDTO(StatusConsts.STATUS_ERROR, false,  null,"没有查询到工程师");
////        }
////
////        List<VtDTO> items = new ArrayList<>();
////        response.getItems().forEach(item -> {
////            String statusStr = Objects.equals(item.getEngineerStatus(), 3) ? " <离职> " : "";
////            items.add(new VtDTO(item.getEngineerId(), (item.getEngineerName() + statusStr), item.getEngineerStatus()));
////        });
////
////        return new ResponseDTO(StatusConsts.STATUS_SUCCESS, true, items, String.format("共查询到%s个结果", items.size()));
//    }
//    // endregion
//
//}
